var Legal = Vue.component('legal', {
    data() {
        return {
            editStatus: true // 是否可编辑判断
        }
    },

    template: `<div class="legal__box">
                    <div class="legal__con">
                        <h3 class="index__title legal__title">法人信息</h3>
                        <div :class="['index__info', {input__border: !editStatus}]">
                            <div class="legal__list">
                                <span>法人姓名：</span>
                                <input placeholder="" value="亚瑟" :disabled="editStatus">
                            </div>
                            <div class="legal__list">
                                <span>法人性别：</span>
                                <input placeholder="" value="男" :disabled="editStatus">
                            </div>
                            <div class="legal__list">
                                <span>手机号码：</span>
                                <input placeholder="" value="66666666666" :disabled="editStatus">
                            </div>
                            <div class="legal__list">
                                <span>身份证号码：</span>
                                <input placeholder="" value="8888888888888888" :disabled="editStatus">
                            </div>
                            <div class="legal__list">
                                <span>身份证正面：</span>
                                <div class="legal__img"></div>
                            </div>
                            <div class="legal__list">
                                <span>身份证反面：</span>
                                <div class="legal__img"></div>
                            </div>
                            <div class="legal__list">
                                <span>身份证手持正面：</span>
                                <div class="legal__img"></div>
                            </div>
                        </div>
                        <div class="common__btn">
                            <div class="common__btn__box">
                                <span class="common__btn__sure" v-show="editStatus" @click="setEditFun">编辑</span>
                                <span class="common__btn__close" v-show="!editStatus" @click="setCancelFun">取消</span>
                                <span class="common__btn__sure" v-show="!editStatus" @click="setInfoFun">保存设置</span>
                            </div>
                        </div>
                    </div>
                </div>`,

    methods: {
        setEditFun: function () {  // 编辑
            this.editStatus = !this.editStatus
        },
        setCancelFun: function () { // 取消
            this.editStatus = !this.editStatus
        },
        setInfoFun: function () { // 保存设置
            this.editStatus = !this.editStatus
        }
    },

    mounted() {

    },

    created() {
        console.log(this.$route, '%%%')
    },

})